﻿Public Class TaiKhoanBUS
    Public Function Insert(ByVal tk As TaiKhoanDTO) as Boolean
        Dim tkDAO As New TaiKhoanDAO
        Return tkDAO.Insert(tk)
    End Function
    Public Sub Delete(ByVal tk As TaiKhoanDTO)
        Dim tkDAO As New TaiKhoanDAO
        tkDAO.Delete(tk)
    End Sub
    Public Sub Update(ByVal tk As TaiKhoanDTO)
        Dim tkDAO As New TaiKhoanDAO
        tkDAO.Update(tk)
    End Sub
    Public Function CheckID(ByVal tk As TaiKhoanDTO) As Boolean
        Dim tkDAO As New TaiKhoanDAO
        Return tkDAO.CheckID(tk)
    End Function
    Public Function CheckDangNhap(ByVal tk As TaiKhoanDTO) As Integer
        Dim tkDAO As New TaiKhoanDAO
        Return tkDAO.CheckDangNhap(tk)
    End Function
    Public Function GetAll() As DataTable
        Dim tkDAO As New TaiKhoanDAO
        Dim dt As New DataTable
        dt = tkDAO.GetAll()
        Return dt
    End Function
    Public Function GetItemID(ByVal tenDN As String) As TaiKhoanDTO
        Dim tkDAO As New TaiKhoanDAO
        Return tkDAO.GetItemID(tenDN)
    End Function
    Public Function GetItemLoaiTK(ByVal loaiTK As Integer) As DataTable
        Dim tkDAO As New TaiKhoanDAO
        Dim dt As New DataTable
        dt = tkDAO.GetItemLoaiTK(loaiTK)
        Return dt
    End Function
    Public Sub UpdateTrangThai(ByVal tk As TaiKhoanDTO)
        Dim tkDAO As New TaiKhoanDAO
        tkDAO.UpdateTrangThai(tk)
    End Sub
    Public Function GetItemTrangThai(ByVal trangthai As Integer) As DataTable
        Dim tkDAO As New TaiKhoanDAO
        Return tkDAO.GetItemTrangThai(trangthai)
    End Function
End Class
